﻿using System.Configuration;
using Inscriptionem.Configuration.Elements.Base;

namespace Inscriptionem.Configuration.Elements.Members
{
    public class MembersElement : BaseConfigurationElement
    {
        [ConfigurationProperty("registrationAllowed", DefaultValue = true, IsRequired = true)]
        public bool RegistrationAllowed
        {
            get
            {
                return (bool)this["registrationAllowed"];
            }
            set
            {
                this["registrationAllowed"] = value;
            }
        }

        [ConfigurationProperty("registrationApprovalRequired", DefaultValue = true, IsRequired = true)]
        public bool RegistrationApprovalRequired
        {
            get
            {
                return (bool)this["registrationApprovalRequired"];
            }
            set
            {
                this["registrationApprovalRequired"] = value;
            }
        }

        [ConfigurationProperty("Mail")]
        public Mail.MailElement Mail
        {
            get
            {
                return (Mail.MailElement)this["Mail"];
            }
            set
            {
                this["Mail"] = value;
            }
        }
    }
}